package org.crazyit.activiti_d3._2_Close;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;

public class Close {

    public static void main(String[] args) {

        //1. 读取配置
        ProcessEngineConfiguration config = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("close.xml");

        //2. 创建流程引擎
        ProcessEngine engine = config.buildProcessEngine();
        System.out.println("完成流程引擎创建");

        //3. 关闭流程引擎
        try {
            Thread.sleep(10000);
            engine.close();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }


    }

}
